<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script src="../LIB/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../LIB/axios.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../LIB/Cookie.js" type="text/javascript" charset="utf-8"></script>
		<script src="../LIB/ajax.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			url = "http://cnady.natapp1.cc/CandyFirst_war_exploded/first/showImage"
			// url = 'http://www.xuzhixiang.top:8360'
			// url = `http://jx.xuzhixiang.top/ap/api/allproductlist.php?pagesize=20&pagenum=0`
			
			// axios.post(url).then((res)=>{
			// 	console.log(res)
			// 	alert(res)
			// })


			xhr = new XMLHttpRequest()
			//请求的方法 get post put update delete
			// 异步  true  同步false 
			xhr.open('POST', url, true)
			xhr.send(null)
			console.log(xhr.responseText)
			xhr.onload = function() {
				console.log(xhr)
				//异步执行
				//数据请求成功就会执行
				//一般请求快慢会 根据网络情况 服务器情况 
				//200 404 状态码
				if (xhr.status == 200) {
					console.log(xhr.responseText)
					// var obj = JSON.parse(xhr.responseText)
					// console.log(obj)
				} else {
					// 请求失败
				}
			}

		</script>
	</body>
</html>
